Skip to content

docs(skill): optimize instructions for agent context#118

Merged
nwparker merged 1 commit into
mainfrom
nwparker/trim-agent-slack-skill
Jul 18, 2026
Merged

docs(skill): optimize instructions for agent context#118
nwparker merged 1 commit into
mainfrom
nwparker/trim-agent-slack-skill

Conversation

@nwparker

@nwparker nwparker commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Why

The installable artifact is an agent skill, not a human command manual. Official Codex skill guidance uses progressive disclosure: metadata triggers the skill, SKILL.md supplies the core workflow, and references load only when needed. A duplicated command catalog and tables of contents consume agent context and drift from the installed CLI.

Reference: OpenAI — Build skills

What changed

  • remove the reference TOCs and 227-line command/flag catalog
  • route agents to installed CLI help for commands and flags, including an explicit version-skew stop instead of guessing or self-updating
  • rewrite SKILL.md as concise execution, safety, scheduling, formatting, and progressive-disclosure guidance
  • retain only non-obvious target, output, download, and recovery behavior in two short conditional references
  • promote fragile contracts into authoritative CLI help and protect them with test/help-contracts.test.ts
  • keep README, llms.txt, and AGENTS.md aligned with the skill
  • rebase onto main and preserve the newly merged canvas-create trigger, mutation boundary, auth/source constraints, and output shape

The installed skill drops from 25.6 KB to 7.2 KB (about 72%) and from roughly 520 lines to 96, without removing CLI capabilities.

Zero-regression review

Nine independent review passes across three rounds covered realistic task routing, every Slack mutation family, base-to-head compatibility, and help/runtime alignment. Findings fixed before the final round include:

  • compose-only requests never invoke Slack; message draft is treated as send-capable and blocked in CI without separate send authorization
  • absolute scheduling and Later reminder timezone behavior
  • URL/channel/user workspace selection, thread overrides, mark-read timestamp overrides, scheduled cancellation, reply broadcasts, and group-DM limits
  • attachment formatting and send-result metadata
  • failed-download paths and reply-after-search recovery
  • canvas-create source, credential, channel-tab, and output contracts added by Add canvas creation from Markdown #116

The final three reviewers found no blockers and marked the PR merge-ready.

Validation

  • official skill validator: pass
  • bun test: 272 pass, 0 fail
  • bun run typecheck: pass
  • bun run build: pass
  • bun run format:check: pass
  • bun run lint: 0 errors (10 pre-existing warnings)
  • git diff --check: pass
  • GitHub CI Build, Lint, Test: pass

@nwparker
nwparker force-pushed the nwparker/trim-agent-slack-skill branch from f2285ca to 77a86d6 Compare July 18, 2026 02:01
@nwparker
nwparker merged commit 2207ec7 into main Jul 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant